package com.geekband.Test01;

import android.app.IntentService;
import android.content.Intent;

/**
 * Function:
 * Create date on 15/11/25.
 *
 * @author Conquer
 * @version 1.0
 */
public class TestIntentService extends IntentService {

    /**
     * Creates an IntentService.  Invoked by your subclass's constructor.
     *
     * @param name Used to name the worker thread, important only for debugging.
     */
    public TestIntentService(String name) {
        super(name);
    }


    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {

        // do more works  UI 线程  >10秒  -->ANR

        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {

            }
        });

        thread.start();

        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    protected void onHandleIntent(Intent intent) {
         // 排队 --》像MessageQueue 同步操作：排队领书 、处理Intent数据


    }
}
